package com.ihr360.job.core.entity;

import java.util.Date;

public class StepExecutionLog extends Entity {
    public enum LogLevel {
        TRACE,
        INFO,
        WARNING,
        ERROR
    }

    private Long stepExecutionId;
    private Long jobExecutionId;
    private LogLevel logLevel;
    private Date logTime;
    private String logTitle;
    private String logContent;

    private String logTitleKey;
    private String logContentKey;

    public StepExecutionLog() {
    }

    public StepExecutionLog(StepExecutionLog.LogLevel logLevel, Long jobExecutionId, Long stepExecutionId, Date logTime, String logTitle, String logContent, String logTitleKey, String logContentKey) {
        this.stepExecutionId = stepExecutionId;
        this.jobExecutionId = jobExecutionId;
        this.logLevel = logLevel;
        this.logTime = logTime;
        this.logTitle = logTitle;
        this.logContent = logContent;
        this.logTitleKey = logTitleKey;
        this.logContentKey = logContentKey;
    }

    public StepExecutionLog(LogLevel logLevel, Long jobExecutionId, Long stepExecutionId, String logTitle, String logContent) {
        this.logLevel = logLevel;
        this.stepExecutionId = stepExecutionId;
        this.jobExecutionId = jobExecutionId;
        this.logTime = null;
        this.logTitle = logTitle;
        this.logContent = logContent;
        this.logTitleKey = null;
        this.logContentKey = null;
    }

    public Long getStepExecutionId() {
        return stepExecutionId;
    }

    public void setStepExecutionId(Long stepExecutionId) {
        this.stepExecutionId = stepExecutionId;
    }

    public Long getJobExecutionId() {
        return jobExecutionId;
    }

    public void setJobExecutionId(Long jobExecutionId) {
        this.jobExecutionId = jobExecutionId;
    }

    public LogLevel getLogLevel() {
        return logLevel;
    }

    public void setLogLevel(LogLevel logLevel) {
        this.logLevel = logLevel;
    }

    public Date getLogTime() {
        return logTime;
    }

    public void setLogTime(Date logTime) {
        this.logTime = logTime;
    }

    public String getLogTitle() {
        return logTitle;
    }

    public void setLogTitle(String logTitle) {
        this.logTitle = logTitle;
    }

    public String getLogContent() {
        return logContent;
    }

    public void setLogContent(String logContent) {
        this.logContent = logContent;
    }

    public String getLogTitleKey() {
        return logTitleKey;
    }

    public void setLogTitleKey(String logTitleKey) {
        this.logTitleKey = logTitleKey;
    }

    public String getLogContentKey() {
        return logContentKey;
    }

    public void setLogContentKey(String logContentKey) {
        this.logContentKey = logContentKey;
    }
}